using System;
using System.Collections.Generic;
using System.Text;

namespace Xivo
{
  class Common
  {
    public static int bounds(int min, int max, int value)
    {
      if (value > max)
        return max;
      if (value < min)
        return min;
      return value;
    }
  }
}
